package com.yanyi.music.service.impl;

import com.yanyi.music.dao.ConsumerMapper;
import com.yanyi.music.domain.Consumer;
import com.yanyi.music.service.ConsumerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class ConsumerServiceImpl implements ConsumerService {
    @Autowired
    private ConsumerMapper consumerMapper;

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return consumerMapper.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(Consumer record) {
        return consumerMapper.insert(record);
    }

    @Override
    public int insertSelective(Consumer record) {
        return consumerMapper.insertSelective(record);
    }

    @Override
    public Consumer selectByPrimaryKey(Integer id) {
        return consumerMapper.selectByPrimaryKey(id);
    }

    @Override
    public int updateByPrimaryKeySelective(Consumer record) {
        return consumerMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(Consumer record) {
        return consumerMapper.updateByPrimaryKey(record);
    }

    @Override
    public List<Consumer> findAll(Map<String, Object> map) {
        return consumerMapper.findAll(map);
    }

    @Override
    public int verifyPassword(String username, String password) {
        return consumerMapper.verifyPassword(username, password);
    }

    @Override
    public Consumer getByUsername(String username) {
        return consumerMapper.getByUsername(username);
    }
}
